package main

import "fmt"

/**
 * @author: guangcheng
 * @date:   2020/11/15 16:05
 * @version  V1.0
 * @description:
 *
 */
func generateFbn(n int) []uint64 {
	fbnSlice := make([]uint64, n, 2*n)

	for i := 0; i < n; i++ {
		if i == 0 || i == 1 {
			fbnSlice[i] = 1
		} else {
			fbnSlice[i] = fbnSlice[i-1] + fbnSlice[i-2]
		}
	}
	return fbnSlice
}

func main() {

	fbn := generateFbn(10)
	for i := range fbn {
		fmt.Printf("%v ", fbn[i])
	}
}
